public class class_cast_exception {
  public static void cast() {
    Object obj = "Hello";
    // 缺陷：错误的类型转换
    Integer num = (Integer)obj; // 抛出 ClassCastException
  }
}
